package com.example.raspberry_pi_demob.entity;

import java.io.Serializable;

/**
 * @author
 *
 */
public class AllData implements Serializable {
    private Integer timestamp;

    private Integer numberOfSatellites;

    private String latitudeAndLongitude;

    private Integer battery;

    private String temperature;

    private String humidity;

    private String atmosphericPressure;

    private String macAddress;

    private String dateTime;

    private String raspberryPiName;

    private Integer updateInterval;

    private static final long serialVersionUID = 1L;

    public Integer getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Integer timestamp) {
        this.timestamp = timestamp;
    }

    public Integer getNumberOfSatellites() {
        return numberOfSatellites;
    }

    public void setNumberOfSatellites(Integer numberOfSatellites) {
        this.numberOfSatellites = numberOfSatellites;
    }

    public String getLatitudeAndLongitude() {
        return latitudeAndLongitude;
    }

    public void setLatitudeAndLongitude(String latitudeAndLongitude) {
        this.latitudeAndLongitude = latitudeAndLongitude;
    }

    public Integer getBattery() {
        return battery;
    }

    public void setBattery(Integer battery) {
        this.battery = battery;
    }

    public String getTemperature() {
        return temperature;
    }

    public void setTemperature(String temperature) {
        this.temperature = temperature;
    }

    public String getHumidity() {
        return humidity;
    }

    public void setHumidity(String humidity) {
        this.humidity = humidity;
    }

    public String getAtmosphericPressure() {
        return atmosphericPressure;
    }

    public void setAtmosphericPressure(String atmosphericPressure) {
        this.atmosphericPressure = atmosphericPressure;
    }

    public String getMacAddress() {
        return macAddress;
    }

    public void setMacAddress(String macAddress) {
        this.macAddress = macAddress;
    }

    public String getDateTime() {
        return dateTime;
    }

    public void setDateTime(String dateTime) {
        this.dateTime = dateTime;
    }

    public String getRaspberryPiName() {
        return raspberryPiName;
    }

    public void setRaspberryPiName(String raspberryPiName) {
        this.raspberryPiName = raspberryPiName;
    }

    public Integer getUpdateInterval() {
        return updateInterval;
    }

    public void setUpdateInterval(Integer updateInterval) {
        this.updateInterval = updateInterval;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AllData other = (AllData) that;
        return (this.getTimestamp() == null ? other.getTimestamp() == null : this.getTimestamp().equals(other.getTimestamp()))
                && (this.getNumberOfSatellites() == null ? other.getNumberOfSatellites() == null : this.getNumberOfSatellites().equals(other.getNumberOfSatellites()))
                && (this.getLatitudeAndLongitude() == null ? other.getLatitudeAndLongitude() == null : this.getLatitudeAndLongitude().equals(other.getLatitudeAndLongitude()))
                && (this.getBattery() == null ? other.getBattery() == null : this.getBattery().equals(other.getBattery()))
                && (this.getTemperature() == null ? other.getTemperature() == null : this.getTemperature().equals(other.getTemperature()))
                && (this.getHumidity() == null ? other.getHumidity() == null : this.getHumidity().equals(other.getHumidity()))
                && (this.getAtmosphericPressure() == null ? other.getAtmosphericPressure() == null : this.getAtmosphericPressure().equals(other.getAtmosphericPressure()))
                && (this.getMacAddress() == null ? other.getMacAddress() == null : this.getMacAddress().equals(other.getMacAddress()))
                && (this.getDateTime() == null ? other.getDateTime() == null : this.getDateTime().equals(other.getDateTime()))
                && (this.getRaspberryPiName() == null ? other.getRaspberryPiName() == null : this.getRaspberryPiName().equals(other.getRaspberryPiName()))
                && (this.getUpdateInterval() == null ? other.getUpdateInterval() == null : this.getUpdateInterval().equals(other.getUpdateInterval()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode());
        result = prime * result + ((getNumberOfSatellites() == null) ? 0 : getNumberOfSatellites().hashCode());
        result = prime * result + ((getLatitudeAndLongitude() == null) ? 0 : getLatitudeAndLongitude().hashCode());
        result = prime * result + ((getBattery() == null) ? 0 : getBattery().hashCode());
        result = prime * result + ((getTemperature() == null) ? 0 : getTemperature().hashCode());
        result = prime * result + ((getHumidity() == null) ? 0 : getHumidity().hashCode());
        result = prime * result + ((getAtmosphericPressure() == null) ? 0 : getAtmosphericPressure().hashCode());
        result = prime * result + ((getMacAddress() == null) ? 0 : getMacAddress().hashCode());
        result = prime * result + ((getDateTime() == null) ? 0 : getDateTime().hashCode());
        result = prime * result + ((getRaspberryPiName() == null) ? 0 : getRaspberryPiName().hashCode());
        result = prime * result + ((getUpdateInterval() == null) ? 0 : getUpdateInterval().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", timeStamp=").append(timestamp);
        sb.append(", numberOfSatellites=").append(numberOfSatellites);
        sb.append(", latitudeAndLongitude=").append(latitudeAndLongitude);
        sb.append(", battery=").append(battery);
        sb.append(", temperature=").append(temperature);
        sb.append(", humidity=").append(humidity);
        sb.append(", atmosphericPressure=").append(atmosphericPressure);
        sb.append(", macAddress=").append(macAddress);
        sb.append(", dateTime=").append(dateTime);
        sb.append(", raspberryPiName=").append(raspberryPiName);
        sb.append(", updateInterval=").append(updateInterval);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}